<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('cost_rules', function (Blueprint $table) {
            $table->string('table_type')->nullable()->comment('台桌类型');
            $table->unsignedBigInteger('assistant_type_id')->nullable()->comment('助教类型');
            $table->string('classify')->default(\App\Enums\CostRuleClassify::Table)->comment('是桌台还是助教');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('cost_rules', function (Blueprint $table) {
            $table->dropColumn('table_type');
            $table->dropColumn('assistant_type_id');
            $table->dropColumn('classify');
        });
    }
};
